package jsyf.oa.entity.contract;

import com.alibaba.fastjson.JSONObject;
import jsyf.oa.ientity.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name = "T_CON_GUARANTOR", schema = "oa", catalog = "")
public class GuarantorEntity extends BaseEntity {

    private String mainId = "";
    private String guarantor = "";//  `GUARANTOR`   '担保人',
    private String guarantorTaxNo = "";//   `GUARANTOR_TAX_NO`   '担保人身份证号',
    private String guarantorAddress = "";//  `GUARANTOR_ADDRESS`  '担保人住所地',
    private String guarantorTel = "";//  `GUARANTOR_TEL`   '担保人电话',
    private Integer sortNo = 0;
    private Integer logFlag = 0;

    public Integer getLogFlag() {
        return logFlag;
    }

    public void setLogFlag(Integer logFlag) {
        this.logFlag = logFlag;
    }

    public Integer getSortNo() {
        return sortNo;
    }

    public void setSortNo(Integer sortNo) {
        this.sortNo = sortNo;
    }

    public String getGuarantor() {
        return guarantor;
    }

    public void setGuarantor(String guarantor) {
        this.guarantor = guarantor;
    }

    public String getGuarantorTaxNo() {
        return guarantorTaxNo;
    }

    public void setGuarantorTaxNo(String guarantorTaxNo) {
        this.guarantorTaxNo = guarantorTaxNo;
    }

    public String getGuarantorAddress() {
        return guarantorAddress;
    }

    public void setGuarantorAddress(String guarantorAddress) {
        this.guarantorAddress = guarantorAddress;
    }

    public String getGuarantorTel() {
        return guarantorTel;
    }

    public void setGuarantorTel(String guarantorTel) {
        this.guarantorTel = guarantorTel;
    }

    public String getMainId() {
        return mainId;
    }

    public void setMainId(String mainId) {
        this.mainId = mainId;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject obj = new JSONObject();
        obj.put("ID", getId());
        obj.put("MAIN_ID", getMainId());
        obj.put("GUARANTOR", getGuarantor());
        obj.put("GUARANTOR_TAX_NO", getGuarantorTaxNo());
        obj.put("GUARANTOR_ADDRESS", getGuarantorAddress());
        obj.put("GUARANTOR_TEL", getGuarantorTel());
        obj.put("SORT_NO", getSortNo());
        obj.put("LOG_FLAG", getLogFlag());
        return obj;
    }

    @Override
    public String getTableName() {
        return "T_CON_GUARANTOR";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID", "id");
        obj.put("MAIN_ID", "mainId");
        obj.put("GUARANTOR", "guarantor");
        obj.put("GUARANTOR_TAX_NO", "guarantorTaxNo");
        obj.put("GUARANTOR_ADDRESS", "guarantorAddress");
        obj.put("GUARANTOR_TEL", "guarantorTel");
        obj.put("SORT_NO", "sortNo");
        obj.put("LOG_FLAG", "logFlag");
        return obj;
    }
}
